
<?php include_once(dirname(__FILE__) . '/../general/head.php'); ?>

<!-- header -->
<?php include_once(dirname(__FILE__) . '/../general/header.php'); ?>

<?php include_once('left.php'); ?>


<div id="page-wrapper">

    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Các tiêu chí đánh giá thái độ</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    Danh sách
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <?php if ($attitudeCriterias == false) { ?>
                        Hiện tại không có tiêu chí đánh giá nào!
                        <br>
                    <?php } else { ?>
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover sb-table">
                                <thead>
                                    <tr>
                                        <!--<th>Id</th>-->
                                        <th width="50px">&nbsp;</th>
                                        <th>Tiêu chí</th>
                                        <!--<th>Điểm</th>-->
<!--                                        
                                        <th><font color="green">Vượt trội (%)</font></th>
                                        <th><font color="blue">Có thể hiện (%)</font></th>
                                        <th><font color="red">Cần cải thiện (%)</font></th>
                                        -->
                                        
                                        <th><font color="green">Vượt trội</font></th>
                                        <th><font color="blue">Có thể hiện</font></th>
                                        <th><font color="red">Cẩn cải thiện</font></th>
                                        <th>Tổng số</th>
                                    </tr>
                                </thead>
                                <tbody>


                                    <?php
                                    foreach ($attitudeCriterias as $eachAC) {
                                        ?>
                                        <tr>
                                            <!--<td><?php echo $eachAC['id']; ?></td>-->
                                            <td>
                                                <a href="javascript: if(confirm('Bạn có chắc là muốn xóa không??')){ window.location='<?php echo site_url(get_folder($loggedUser['title']).'/attitude_criterias/delete/' . $eachAC['id']); ?>'; }">
                                                    <img src="<?php echo base_url(); ?>images/cross.png" title="Delete">
                                                </a>
                                                <a href="<?php echo site_url(get_folder($loggedUser['title']).'/attitude_criterias/edit/' . $eachAC['id']); ?>">
                                                    <img src="<?php echo base_url(); ?>images/edit.png" title="Edit">
                                                </a>
                                            </td>
                                            <td><?php echo $eachAC['name']; ?></td>
                                            <!--<td><?php echo $eachAC['score']; ?></td>-->
<!--                                            
                                            <td><font color="green"><?php echo round($eachAC['highLevelRatio'],1); ?></font></td>
                                            <td><font color="blue"><?php echo round($eachAC['mediumLevelRatio'],1); ?></font></td>
                                            <td><font color="red"><?php echo round($eachAC['lowLevelRatio'],1); ?></font></td>
                                            -->
                                            
                                            <td>
                                                <font color="green"><?php echo $eachAC['highLevel']?></font>
                                            </td>
                                            <td>
                                                <font color="blue"><?php echo $eachAC['mediumLevel']?></font>
                                            </td>
                                            <td>
                                                <font color="red"><?php echo $eachAC['lowLevel']; ?></font>
                                            </td>
                                            <td><?php echo $eachAC['highLevel']+$eachAC['mediumLevel']+$eachAC['lowLevel'] ?></td>
                                        </tr>

                                    <?php } ?>

                                </tbody>
                            </table>

                        </div>
                    <?php } ?>
                    <br>
                    <a href="<?php echo site_url(get_folder($loggedUser['title']).'/attitude_criterias/add'); ?>"> <img src="<?php echo base_url(); ?>images/plus.png" title="Thêm tiêu chí mới"> Thêm tiêu chí mới</a>
                    <br>

                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->



        </div>
        <!-- /.col-lg-12 -->
    </div>


</div>
<!-- /#page-wrapper -->

<?php include_once(dirname(__FILE__) . '/../general/footer.php'); ?>